import 'model_entity.dart';

class AiPayEntity {
  List<AiBenefit>? benefit;
  ModelEntity? info;
  List<AiPrice>? price;

  AiPayEntity({this.benefit, this.info, this.price});

  AiPayEntity.fromJson(Map<String, dynamic> json) {
    if (json['aiTypeArray'] != null) {
      benefit = <AiBenefit>[];
      json['aiTypeArray'].forEach((v) {
        benefit!.add(new AiBenefit.fromJson(v));
      });
    }
    info = json['appModuleRsp'] != null
        ? new ModelEntity.fromJson(json['appModuleRsp'])
        : null;
    if (json['priceArray'] != null) {
      price = <AiPrice>[];
      json['priceArray'].forEach((v) {
        price!.add(new AiPrice.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.benefit != null) {
      data['aiTypeArray'] = this.benefit!.map((v) => v.toJson()).toList();
    }
    if (this.info != null) {
      data['appModuleRsp'] = this.info!.toJson();
    }
    if (this.price != null) {
      data['priceArray'] = this.price!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}


class AiPrice {
  String? content;
  String? days;
  int? id;
  int? aiId;
  String? price;
  String? tag;

  AiPrice({this.content, this.days, this.id, this.aiId, this.price, this.tag});

  AiPrice.fromJson(Map<String, dynamic> json) {
    content = json['content'];
    days = json['days'];
    id = json['id'];
    aiId = json['aiId'];
    price = json['price'];
    tag = json['tag'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['content'] = this.content;
    data['days'] = this.days;
    data['id'] = this.id;
    data['aiId'] = this.aiId;
    data['price'] = this.price;
    data['tag'] = this.tag;
    return data;
  }
}


class AiBenefit {
  int? hidden;
  int? id;
  String? info;
  String? infoDetail;
  String? logo;
  String? name;
  String? notice;
  String? page;
  int? sort;
  int? upgrade;

  AiBenefit(
      {this.hidden,
        this.id,
        this.info,
        this.infoDetail,
        this.logo,
        this.name,
        this.notice,
        this.page,
        this.sort,
        this.upgrade});

  AiBenefit.fromJson(Map<String, dynamic> json) {
    hidden = json['hidden'];
    id = json['id'];
    info = json['info'];
    infoDetail = json['infoDetail'];
    logo = json['logo'];
    name = json['name'];
    notice = json['notice'];
    page = json['page'];
    sort = json['sort'];
    upgrade = json['upgrade'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['hidden'] = this.hidden;
    data['id'] = this.id;
    data['info'] = this.info;
    data['infoDetail'] = this.infoDetail;
    data['logo'] = this.logo;
    data['name'] = this.name;
    data['notice'] = this.notice;
    data['page'] = this.page;
    data['sort'] = this.sort;
    data['upgrade'] = this.upgrade;
    return data;
  }
}

class RightCheck {
  String? endTime;
  int? isOpen;

  RightCheck({this.endTime, this.isOpen});

  RightCheck.fromJson(Map<String, dynamic> json) {
    endTime = json['endTime'];
    isOpen = json['isOpen'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['endTime'] = this.endTime;
    data['isOpen'] = this.isOpen;
    return data;
  }
}
